home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Programmation / Gooey1.3.1 / Docs & Compile Hints / Gooey Code Gen Manual next >
Text File  |  1995-01-25  |  26KB  |  546 lines

  1. Gooey Code Generator, V1.0
  2.  
  3.  
  4.     The Gooey Code Generator supports template files ("temFiles").  These templates are designed to provide all the hooks for the end user.  Allow for more optimized code generation.  And to allow the user to reformat the template files into thier own indenting method.
  5.  
  6.     The template files fit into 3 categorys. 
  7.  
  8.      The first category is for the file named "Setup".  This is the file that is presented to the user for code generation options.  
  9.  
  10.     The second category is for the file named "Links".  This file is called like a subroutine from within the template files.  This file generates the code for all the Gooey linkages, like pressing a button to open a window.  
  11.  
  12.     The last category is the templates for all the files to be generated.  The standard naming convention is to prefix the files with "mm" if they generate Gooey private files (ones the user does not normally modify).  The other files are the ones the user modifies (the ones with the Hook routines).
  13.  
  14.  
  15. ** Template selection.
  16.  
  17.     The first thing to do after starting up the Gooey Code Generator is to select the Template folder for the language variation that you will be using.  Either use the menu item for activating this selection (or Cmd-T ) or simply press on the Templates button (which is a button with documents overlapping each other).
  18.     Press the 'Select"xxx"' button at the bottom of the selection dialog.  This will select the desired template folder. This folder preference will be saved for the next time the Gooey Code Generator is run.
  19.     Pressing "Open" will open the currently selected folder. It will not select it as the "Template" folder.  You must press the button below the list area to select a template folder.
  20.  
  21.     Next, select the menu item to enter your own unique copyright notice. If you do not enter one then the default copyright notice will be used. This string will be inserted by the Gooey Code Generator into the output files.  Remember that this string will be placed on one line, not multiple lines. This information is kept in the preferences file for the next time this program is run.
  22.  
  23.     Next, open the Gooey prototype that you have previously designed. This loads in the prototype that we will be generating code for.  Either use the menu item for activating this selection or simply press on the Select Prototype button.
  24.  
  25.     Next, start the code generation. Either use the menu item for activating this selection or simply press on the Generate Code button. 
  26.     The "progress" bar across the bottom is actually a "File position" indicator. It is very useful when designing your template files, for seeing loops in the file. As the code is generated you will see it's progress thru each file.  The short files will go by very fast, while the large files require more processing.
  27.     
  28.     Messages of interest, and used to determine progress, are displayed in the text area toward the bottom of the window:
  29.  
  30.     To close the current prototye, and to get ready to open another one, select the "Close" menu option:
  31.  
  32.     To quit the Gooey Code Generator, simply select the "Quit" menu option:
  33.  
  34.  
  35.  
  36.  
  37.  
  38. ** Setup file.
  39.  
  40.     When the Gooey Code Generator is started up and a Template folder had previously been selected then it automatically opens the "Setup" file in that folder to present the user with the specific code generation options for those templates.
  41.  
  42.     Now for an explaination of how this file is read and what it affects.
  43.  
  44.     Before reading the "Setup" file the following defaults are initialized inside of the Code Generator:
  45.     a) The standard command delimiter is set to be '$'.
  46.     b) The file creator, for all files to be made except for the Rez file, is set to 'KAHL'. This is the default creator for THINK C and THINK C++.
  47.     c) The flag saying that we are doing Pascal is set to FALSE.
  48.  
  49.  
  50. ** TCL flag.
  51.     TCL (THINK Class Library) vs others.  When the "Setup" file is read the name of the template folder is scanned.  If the characters "TCL" are in the template folder name then a special flag is set to true.  This flag tells the resource creation code that it should add the command IDs to each menu item name.  
  52.  
  53.  
  54. ** File.
  55.     The first class of commands are 'File'.  There is only one type in this class and that is 'Creator'.  
  56.     Creator, e.g.  $File.Creator = PJMM$, is used to change the file creator from the default of 'KAHL' (for THINK C) to something else (like PJMM for THINK Pascal).  This makes all the text files created have the file creator that corresponds to the compiler/editor that needs to be opened when they are double-clicked on. The Type for all files will automatically be set to 'TEXT'.
  57.  
  58.  
  59. ** Code.
  60.     The next class of commands are 'Code'.  There are two types in this class.
  61.     Delimiter, e.g. $Code.Delimiter = #$, changes the command delimiter from the default of '$' into a new character.  This is commonly changed when the default character '$' has a normal use in the language the templates are for. For example, Pascal uses the '$' to specify hexidecimal characters.  So, the default is changed for it's templates over to '#'.
  62.     Pascal, e.g. $Code.Pascal$, is used to flag the Code Generator that Pascal is being generated.  This difference affects the type style definition.  C uses numbers added together for different combinations of styles.  Pascal uses a set definition that must have brackets enclosing then and separate them by commas instead of adding them together.  So, for Pascal the type style may be [bold, underline].  For non Pascal, the type style will be    bold + underline.
  63.  
  64.  
  65. ** Option.
  66.     The final class of commands for the "Setup" file are 'Option' commands.  These commands always come in groups of 3 lines of information.
  67.     Where 'Option.Name' defines the conditional code generation name to be used in the templates.  Only the first 8 characters of this name are used for matching, however the name can be longer than 8 characters.  
  68.     'Option.Description' contains the message line to be displayed in the Gooey Code Generation options list.  This name should say either to add or support some option.  
  69.     'Option.Default' is defined to either be 'true' or 'false'.  This is the default state that this option is displayed to the user as.  For example, if the default is set to 'true' then this option is initially checked (selected) when the Gooey Code Generator is started up.  If this default is set to 'false' then it is initially unchecked.  It is best to set this default to the case more often used.   The user can edit this file and easily change the default to be what they like the best.
  70.     Add your own conditional code generation options to this file.  Define a Name to optionally add in your favorite code at areas that you seem to always add the same thing.  Also, this can be used to add in support for something that you may be adding always yourself, like support for QuickTime.   In this case you would add in the support code inside a conditional code generation statement.
  71.  
  72.  
  73. ** Template files.
  74.     Template files are organized to create both the files that Gooey uses to handle the interface and events for you, prefixed with 'mm' and the files that contain all the 'Hooks' to add in your additions.  So, if a generated file starts with 'mm', like mmWMainWindow.c, then that file is a Gooey file that is not normally edited.  If there is no prefix and it is not the 'Main' file, then that file is designed to contain all the hooks that you need to add in your own code.
  75.     Most Compilers also support the sources being in multiple folders. Where this is the case the Gooey files will be placed in a folder titled 'mm'.  All other files will be in the 'u' folder.
  76.  
  77.  
  78. There are two (2) types of commands in these template files.  One type is flow control and condition checking.  The other type is value and name substitution.
  79.  
  80. ** Flow control and condition checking.
  81.  
  82. ** Message.
  83.     "Message" sends a message to the Gooey Code Generator message line display. This is designed as a general progress and information message to the user. This message will also go out to the 'Generation Notes' file.
  84.  
  85. $$Message   Text to the message    
  86.     where:   $Worksheet.name$ and $Prototype.name$ are allowed in the message.  The $Prototype.name$ is the prototype name and is used for general files, like "Common".  While $Worksheet.name$ is a worksheet specific name and is only valid inside a worksheet (Alert, Dialog, or Window) loop.
  87.  
  88.  
  89. ** Loop.
  90.     "Loop" first checks to see if there is anything to loop thru, for example if it is a loop for Alerts then it checks to see if any Alerts were designed in the prototype.  If the condition is true, and there are items to loop thru then the code inside the "$$Loop xxx" and the "$$endLoop" statements will generate code.  If the condition is false then no code is generated inside this "Loop".  Remember that nested "Loop"s inherit a previous false condition from an "If" or "Loop", overriding thier potential true condition.  So if an outside "if" is false then all "Loop"s inside it are also made to contain nothing to loop thru.
  91.     NOTE: A special check is done if the "Loop" command is the first line in a template file.  If the condition is false, e.g. there were no Alerts designed in the Prototype file, then that whole template file is closed and skipped.
  92.  
  93. NOTE: Loops for Links are described in the "Links" file section.
  94.  
  95. Loop thru all Menu lists.  This will loop thru standard menus only and not hierarchial menus.
  96. $$Loop Menus
  97.  
  98. Loop thru all Hierarchial Menu lists.  This will loop thru hierarchial menus only and not standardmenus.
  99. $$Loop HierMenus
  100.  
  101. Loop thru all Menu items in the current menu. This loop should be used inside of either a "Menus" or "HierMenus" loop.
  102. $$Loop MenuItems
  103.  
  104. Loop thru all popup menu items in the current control. While looping thru controls, and verifying that the current control is a popup, then use this loop to go thru all the popup menu items.
  105. $$Loop PopupItems
  106.  
  107. Loop thru all palette items in the current control. While looping thru controls, and verifying that this control is a Palette, then use this loop to loop thru all possible palette selections.
  108. $$Loop PaletteItems
  109.  
  110. Loop thru all radios in the current control's group. This is used in radio selection, to turn off all other radios in this radio group, when a specific radio is selected.
  111. $$Loop RadioGroup
  112.  
  113. Loop thru all worksheets, only do Alerts.
  114. $$Loop Alerts
  115.  
  116. Loop thru all worksheets, only do Modal & Modeless Dialogs. This loop is used where you handle Modal and Modeless dialogs the same way.
  117. $$Loop Dialogs
  118.  
  119. Loop thru all worksheets, only do Modal Dialogs.
  120. $$Loop ModalDialogs
  121.  
  122. Loop thru all worksheets, only do Modeless Dialogs and Movable Modal Dialogs ( which are usually Modeless Dialogs with an extra flag set).
  123. $$Loop ModelessDialogs
  124.  
  125. Loop thru all worksheets, only do windows.
  126. $$Loop Windows    
  127.  
  128. Loop thru all Sounds.
  129. $$Loop Sounds
  130.  
  131. Loop thru all controls in the current window or dialog.
  132. $$Loop Controls
  133.  
  134. Loop for a specific control type only, the valid types are:
  135. $$Loop Control.type = xxx
  136.     'BUTTON', 'CHECKBOX', 'RADIO', 'STATICTEXT', 'SCROLLBAR', ICON', 'PICTURE', 'EDITTEXT', 'UBUTTON', 'UTOGGLE', 'UGAUGE', 'LINE', 'HOTRECT', 'LIST', 'POPUP', 'PALETTE', 'SICN'.
  137.     
  138.  
  139. ** EndLoop.
  140.  
  141.     "endLoop" terminates the last "Loop" command.  At this time the code generation flag takes on one of two states:
  142.     a) If this is the last item to loop thru then no loop back is performed and the code generation state returns to the previous "If" or "Loop" result (either true or false).
  143.     b) If this is not the last item to be looped thru then the loop returns to the line immediately following the "Loop" command and the next item is processed.
  144.  
  145. $$EndLoop    End of a loop.
  146.  
  147.  
  148. ** File.
  149.  
  150.     "File" is used to create an output file.  It is placed as the first line of the template file for general code.  It is usually the second or third line in template files that loop thru worksheet types, e.g. Alerts or dialogs or Windows.  Two substitutions are allowed in these lines.  One is for the prototype name, used to append to general file names.  The other is the current worksheet name.
  151.     The file created is of type "TEXT" and creator "KAHL", unless the creator was changed in the "Setup" file.
  152.  
  153. $$File mm$Worksheet.name$.c
  154. $$File MyFile_$Prototype.name$.c
  155.  
  156.  
  157.  
  158. ** CloseFile.
  159.  
  160.     "CloseFile" closes the currently open output file.
  161.  
  162. $$CloseFile
  163.  
  164.  
  165. ** Link.
  166.  
  167.     "Link" first checks to see if there are any Gooey linkages designed in the prototype for the currently active object.  If there are any then the "Links" file is opened and all linkages are found and the code generated for them.
  168.  
  169. Links to happen on the Open of a Window, Dialog, or Alert.
  170. $$Link    Worksheet.Open    
  171.  
  172. Links to happen on the Close of a Window, Dialog, or Alert
  173. $$Link    Worksheet.Close
  174.  
  175. Links for an Activate of a Window or Modeless Dialog.
  176. $$Link    Worksheet.Activate
  177.  
  178. Links for a Deactivate of a Window or Modeless Dialog.
  179. $$Link    Worksheet.Deactivate
  180.  
  181. Do links for the current Menu Item.
  182. $$Link    Menu
  183.  
  184. Links for selected  or pressed.  E.g. Checking a checkbox, or pressing a button.
  185. $$Link    Control.Select
  186.  
  187. Links for deselected, for checkboxes and radios. E.g. Unchecking a checkbox.
  188. $$Link    Control.Deselect
  189.  
  190.  
  191. ** IF.
  192.  
  193.     "If" first checks the condition.  If the condition is true then the code inside the "$$If xxx" and the "$$endif" statements are generated.  If the condition is false then no code is generated inside this "If".  Remember that nested "If"s inherit a previous false condition, overriding thier potential true condition.  So if an outside "if" or "Loop" is false then all "if"s inside it are also made false.
  194.  
  195. ** If Option.
  196.  
  197. For user options
  198. $$if Option.xxx            
  199.     where xxx is the Name specified in the "Setup" file as an option name.  Remember that the first 8 characters are actually used, even though the name can be longer than 8 characters.
  200.  
  201.  
  202. ** If Menu.
  203.  
  204. For use inside of a Menu loop.
  205. $$if Menu.xxx
  206.  It is true if we are in the loop for that type ofmenu.
  207.     Apple            Apple Menu
  208.     File                File Menu
  209.         New            'New' item in the File Menu
  210.         Open            'Open...'  item in the File Menu
  211.         Close            'Close' item in the File Menu
  212.         Save            'Save' item in the File Menu
  213.         SaveAs        'Save As...'  item in the File Menu
  214.         Revert            'Revert to Saved'  item in the File Menu
  215.         PageSetup        'Page Setup...'  item in the File Menu
  216.         Paint            'Print...' item in the File Menu
  217.         Quit            'Quit' item in the File Menu
  218.     Edit                Edit Menu
  219.         Undo            'Undo' item in the Edit Menu
  220.         Cut                'Cut' item in the Edit Menu
  221.         Copy            'Copy' item in the Edit Menu
  222.         Paste            'Paste' item in the Edit Menu
  223.         Clear            'Clear' item in the Edit Menu
  224.         SelectAll        'Select All' item in the Edit Menu
  225.     Font            Font Menu
  226.  
  227. For use inside of a MenuItem loop.  It is true if we are in the item named 'Quit'. Note that another check also has to be true, and that is that the Menu this item is in must be titled 'File'.
  228. NOTE: For localization purposes, these names are kept in a 'STR#' resource inside of the Gooey Code Generator.
  229.  
  230.  
  231.  
  232. ** If Worksheet.
  233.  
  234. For Windows, Dialogs, and Alerts
  235. $$if Worksheet.xxx
  236. This condition is true if the current worksheet looping thru has this attribute:
  237.     OpenAtStartup            If designed to open at program startup.
  238.     Center                Center window selected, Horz or Vert or Both.
  239.     CenterHorz            Horz center window on screen.
  240.     CenterVert            Vert center window on screen.
  241.     SavePosition            Save window loc. from program open to open.
  242.     Document            A document type window, with grow box. 
  243.     Icons                Has graphical icons in this window.
  244.     Pictures            Has graphical pictures in this window.
  245.     Lists                Has lists in this window.
  246.     EditLists            Has EditText or lists  in this window.
  247.     HotSpots            Has HotRects in this window.
  248.     Sicns                Has sicns in this window.
  249.     Palettes            Has palettes in this window.
  250.     CheckboxesOrRadios        Has checkboxes, radios, or toggle plugins.
  251.     HasCheckboxes        Has checkboxes, radios, or toggle plugins.
  252.     HasControls            If window has any controls at all.
  253.     Scrollbars            If window has any scrollbars or gauge plugins.
  254.     ScrollHorz            Horz scrollbar for document type window
  255.     ScrollVert            Vert scrollbar for document type window
  256.  
  257.  
  258. ** If Alert.
  259.  
  260. $$if Alert.xxx
  261. This condition is true if the current Alert looping thru has this attribute:
  262.     Stop                Stop alert
  263.     Note                Note alert
  264.     Caution            Caution alert
  265.     
  266.  
  267. ** If ModelessDialog.
  268.  
  269. $$if ModelessDialog.xxx
  270. This condition is true if the current Dialog looping thru has this attribute:
  271.     Zoomable            Zoomable Modeless
  272.     Resizable            Resizable Modeless
  273.     GoAway            Has a GoAway box
  274.     Movable            Movable modal dialog 
  275. If Window.
  276.  
  277. $$if Window.xxx
  278. This condition is true if the current Window looping thru has this attribute:
  279.     Zoomable            Zoomable window
  280.     Resizable            Resizable window
  281.     GoAway            Has a GoAway box
  282.     Floating            Floating window
  283.  
  284.  
  285. ** These 3 checks are done on the whole prototype.
  286.  
  287. If HasZoomWindows.
  288.  
  289. $$if HasZoomWindows
  290. If any windows in the prototype have zoom boxes.
  291.  
  292.  
  293. If HasResizableWindows.
  294.  
  295. $$if HasResizableWindows
  296. If any windows in the prototype are resizable.
  297.  
  298.  
  299. If HasGoAwayBoxes.
  300.  
  301. $$if HasGoAwayBoxes
  302. If any windows in the prototype have close boxes.
  303.  
  304.  
  305.  
  306. ** If Control.Type.
  307.  
  308. This check is done on the current control we are looping thru.
  309. $$if Control.type = xxx
  310.     'BUTTON', 'CHECKBOX', 'RADIO', 'STATICTEXT', 'SCROLLBAR', ICON', 'PICTURE', 'EDITTEXT', 'UBUTTON', 'UTOGGLE', 'UGAUGE', 'LINE', 'HOTRECT', 'LIST', 'POPUP', 'PALETTE', 'SICN'.
  311.  
  312.  
  313.  
  314. ** If Control.
  315.  
  316. These checks are done on the current control we are looping thru.
  317. $$if Control.xxx
  318.     Default            Default control, e.g. OK or Cancel outlined.
  319.     Graphic        Graphic, not a button. For Icons, sicns, & Pictures.
  320.     NonGraphic        Active button type, e.g. Picture used as button.
  321.     HotSpot        For HotRect, says HotSpot is active.
  322.     Rectangle        For HotRect, says HotSpot is inactive, a rectangle.
  323.     MultipleLine        For StaticText, says TextBox call is to be used.
  324.     SingleLine        For StaticText, says DrawString call is to be used.
  325.     ClipPicture        For Picture, says clip picture instead of resize to fit.
  326.     ResizePicture    For Picture, says resize picture to fit instead of clip.
  327.     UserString        For HotRect, says a message string is used.
  328.     GrayLine        For Line, says to draw the line in gray pattern.
  329.     SpecialText        Flags text has nonstandard color, size, font, or style.
  330.     StandardText        Flags text has standard color, size, font, or style.
  331.     Global            Global, vs local, variable
  332.     Selected        Checked or selected. For Checkbox, Radio, toggles.
  333.     Unselected        Unchecked or unselected. For Checkbox, Radio, toggles.
  334.     Dimmed        If initially dimmed.
  335.     ExitDialog        Linkage, if ExitDialog was selected. For  dialogs.
  336.     Plugin            True if a plugin control.
  337.     HasLinks        True if the control has linkages.
  338.  
  339.  
  340. $$if Control.LineWidth ! 1
  341. For Lines. Check for nonstandard size. '!' only allowed.  Any size value can be checked against.  This condition is true if the line width is not one (1) wide.
  342.  
  343. $$if Control.TextColor ! Black
  344. Check for nonstandard color. '!' and 'Black' only allowed. This condition is true if the control's text color is not black.
  345.  
  346. $$if Control.TextSize ! 12
  347. Check for nonstandard size. '!' only allowed.  Any size value can be checked against, or 'Standard'.  This condition is true if the text size is not set to 12 point.
  348.  
  349. $$if Control.TextFont ! System
  350. Check for nonstandard font. '!' ,'Standard', 'applFont', and 'System' only allowed.  This condition is true if the text font is not set to the system font.
  351.  
  352. $$if Control.TextStyle ! 0
  353. Check for nonstandard style. '!', 'Standard', and '0' only allowed. This condition is true if the text style is not set to plain, e.g. NOT bold or underline, etc.
  354.  
  355.  
  356. ** EndIf.
  357.  
  358.     "endif" terminates the last "if" command.  At this time the code generation flag takes on one of two states:
  359.     a) If this is an outside and not nested "If" then code generation is true.
  360.     b) If this is a nested "If" then the code generation state returns to the previous "If" or "Loop" result (either true or false).
  361.  
  362. $$endif        End of an IF
  363.  
  364.  
  365. ** Code.Delimiter.
  366.  
  367.     "Code.Delimiter" is allowed in the template file.  The normal use for it is to place one line immediately in front of the code line and another immediately after it. This would switch the delimiter to another character for only one line of code, the special code line that needs to generate this delimiter value as a normal character in a line of code.
  368.  
  369. $$Code.Delimiter = #
  370.  
  371.  
  372.  
  373.  
  374. ** Value and name substitution.
  375.  
  376.     The commands listed in this section result in substitutions.  What is substituted in may be a value, a name, or a string.  The substitution may only be valid with in the proper context. For example, a control name substitution is only valid when inside of a control "Loop".  Otherwise, the Gooey Code Generator does not know which control you want the name for.
  377.  
  378.     When a "Unique name" is specified then that name will be only 'a' to 'z' and 'A' to Z' characters, all other characters are changed to '_'.  
  379.  
  380.  
  381. $CopyRight$
  382. Copyright string, from dialog in Gooey. Be sure to select the Copyright menu item in the code generator before starting code generation.
  383.  
  384.  
  385. $Date$
  386. Current date string.
  387.  
  388.  
  389. $Author$
  390. Author name from Gooey personalization.
  391.  
  392.  
  393. ** Menu list
  394. $Menu.xxx$    
  395.     name            Unique name for this menu.
  396.     FullName        Full name for this menu, spaces and all.
  397.     ID                Resource ID for this menu.
  398.  
  399.  
  400. ** Menu item
  401. $MenuItem.xxx$    
  402.     name            Unique name for this menu item.
  403.     FullName        Full name for this menu item, spaces and all.
  404.     ID                Menu item id.
  405.     CmdID            TCL Command ID for this menu.
  406.  
  407.  
  408. ** For Windows, Dialogs, and Alerts
  409. $Worksheet.xxx$    
  410.     name            Unique name for this alert.
  411.     FullName        Full name for this alert, spaces and all.
  412.     ID                Resource ID for this worksheet.
  413.     RedBackColor        Hex value for red of Window bkgd color
  414.     GreenBackColor        Hex value for green of Window bkgd color
  415.     BlueBackColor        Hex value for blue of Window bkgd color
  416.     LeftPosition            Integer for Left edge of Window.
  417.     TopPosition            Integer for Top edge of Window.
  418.     RightPosition            Integer for Right edge of Window.
  419.     BottomPosition        Integer for Bottom edge of Window.
  420.     Layer                Integer for window floating layer.
  421.  
  422.  
  423. $Sound.xxx$
  424.     name                Unique name for this Sound.
  425.     FullName            Full name for this Sound, spaces and all.
  426.     ID                Resource ID for this Sound.
  427.  
  428.  
  429. $Prototype.xxx$
  430.     name                Unique name for this project.
  431.  
  432.  
  433. $Control.xxx$
  434.     name                Unique name for this control.
  435.     FullName            Full name for this control, spaces and all.
  436.     RedTextColor            Hex value for red portion of the Text color
  437.     GreenTextColor        Hex value for green portion of the Text color
  438.     BlueTextColor            Hex value for blue portion of the Text color
  439.     TextSize            Integer value for Text size.    
  440.     TextFont            Integer or string name for font.
  441.     TextStyle            String name list for style combinations.
  442.     TextAlignment            String , e.g. teForceLeft, teJustRight, etc.
  443.     LeftPosition            Integer for Left edge of control.
  444.     TopPosition            Integer for Top edge of control.
  445.     RightPosition            Integer for Right edge of control.
  446.     BottomPosition        Integer for Bottom edge of control.
  447.     Active                String 'true' if not dimmed, else 'false'.
  448.     LineWidth            Integer for line width.
  449.     ShadowWidth            Integer for shadow line width.
  450.     ItemID                Integer, the DITL ID for Alerts and Dialogs
  451.     StringID            Integer, the STR ID for the attached string.    
  452.     MakeHotSpot            Boolean, true for HotSpot, false for rectangle.
  453.     ID                Integer, the CNTL ID for the control.    
  454.     PopupID            Integer, the Menu popup item field, while looping on PopupItems
  455.     SelectedID            Integer, popup initial selection
  456.     PaletteID            Integer, palette item, looping PaletteItems.
  457.     Row                Integer, palette row, looping PaletteItems
  458.     Column            Integer, palette col, looping PaletteItems
  459.     NumRows            Integer, number of rows in the palette.
  460.     NumColumns            Integer, number columns in the palette.
  461.     HMethod            Integer, palette hilite method.
  462.     Value                Integer, initial value.
  463.     MinScroll            Integer, scrollbar min value.
  464.     MaxScroll            Integer, scrollbar max value.
  465.     StepScroll            Integer, scrollbar arrow step size.
  466.     PageScroll            Integer, scrollbar page step size.
  467.     MenuID                Integer, menu resource ID for popup menu
  468.     NormalID            Integer, Attached icon, etc., ID for normal.
  469.     HilitedID            Integer, Attached icon, etc., ID for hilighted.
  470.  
  471. ** Links file.
  472.     This file is called like a subroutine whenever a linkage in a window or control is found.  It then walks thru all linkages for that item and generates the code for them.
  473.  
  474. These links are for opening and closing other windows, dialogs and alerts.  Then inside these loops the window to be opened is the active window.
  475. $$Loop Link.Open
  476. $$Loop Link.Close
  477.  
  478.  
  479. Sound linkages. The first is simply to the toolbox SysBeep call. The second has to do with playing a sound resource.
  480. $$Loop Link.SysBeep
  481. $$Loop Link.Sound
  482.  
  483.  
  484. Enable or disable a specific menu list.
  485. $$Loop Link.MenuEnable    
  486. $$Loop Link.MenuDisable
  487.  
  488. Enable or disable a specific menu item.
  489. $$Loop Link.ItemEnable        
  490. $$Loop Link.ItemDisable
  491.  
  492. Check or uncheck a menu item. The previous checked or unchecked state is not looked at.
  493. $$Loop Link.ItemCheck        
  494. $$Loop Link.ItemUncheck
  495.  
  496. Toggle a menu item from checked to unchecked or other way. The menu item is first looked at and then it is decided to check or uncheck it.
  497. $$Loop Link.ItemToggle
  498.  
  499. This link should open the system Page Setup dialog.
  500. $$Loop Link.PageSetup
  501.  
  502. This link should open the system Print dialog and start the printing process.
  503. $$Loop Link.Print
  504.  
  505. This link should open the Standard File selection dialog.
  506. $$Loop Link.FileOpen
  507.  
  508. This link should open the Standard File save dialog.
  509. $$Loop Link.FileSave
  510.  
  511. This link should open the custom volume selection dialog.
  512. $$Loop Link.VolumeSelect
  513.  
  514.  
  515. These links are for controls.  Then inside these loops the control to be operated on is the active control.
  516.  
  517. Check a checkbox or plugin toggle.
  518. $$Loop Link.Check
  519.     
  520. Uncheck a checkbox or plugin toggle.
  521. $$Loop Link.Uncheck
  522.  
  523. Select a radio. Remember to turn off all other radios in that group.
  524. $$Loop Link.Radio
  525.  
  526. Hide a control.
  527. $$Loop Link.Hide
  528.  
  529. Show a control.
  530. $$Loop Link.Show
  531.  
  532. Dim, disable, a control.
  533. $$Loop Link.Dim
  534.  
  535. Undim, enable, a control.
  536. $$Loop Link.Undim
  537.  
  538.  
  539.  
  540. Hints ** ** ** ** ** ** ** ** ** ** ** ** 
  541.  
  542.     The best way to study how these commands all work is to modify a template file and see how the changes you make affect the output code.  
  543.     To make it easier and faster you should make a test folder and copy one template file into that folder.  You will then be able to see the resultant code very fast.
  544.  
  545.  
  546.